<p-sidebar [(visible)]="sidebarVisible"
  position="right"
  styleClass="w-40rem"
  (onHide)="onSidebarHide()"
  #sidebarProps>
  <div *ngIf="cfg">
    <div class="card p-fluid">
      <h5 [title]="cfg.Id">MonitorBoard设置</h5>
      <p-accordion [activeIndex]="0">
        <p-accordionTab header="基本设置">
          <div class="field grid">
            <label class="col-12 mb-2 md:col-2 md:mb-0">名称</label>
            <div class="col-12 md:col-10">
              <input type="text"
              pInputText
              class="w-full p-inputtext-sm"
              placeholder="名称"
              [(ngModel)]="cfg.Name" />
            </div>
          </div>
        </p-accordionTab>
        <p-accordionTab header="PLC设置">
          <app-plc-setting [(plc)]="cfg.Plc"></app-plc-setting>
        </p-accordionTab>
        <p-accordionTab header="监控字段设置">
          <app-field-map-list [(fields)]="cfg.Fields"></app-field-map-list>
        </p-accordionTab>
      </p-accordion>
    </div>
  </div>
</p-sidebar>